<template>
	<view class="pl20 v100 pr20 overauto  bgcover no-repeat"
		:style="{ backgroundImage: 'url(' + cosImageUrl('head_bg.png',true) + ')' }">
		<view class="" :style="{'paddingTop':statusBarHeigh + 'px',}">
			<view class="flex alicen pl20" :style="{'height':menuButtonInfo.height + 'px',}">
				<u-icon name="arrow-left" color="#070707" size="18" @click="goback()"></u-icon>
				<view class="w30b"></view>
				<view class=" fz30 col00 bold">专业详情</view>
			</view>
		</view>
		<view class="pb20"></view>
		<view class="pt20 pb20 pl20 pr20 bgfff col33 ius10">
			<view class="flex alicen between colb6">
				<view class="fz30 mt10 mb10">第 <text class="pt8 pb8 pl20 pr20 border1 boree">{{sffIdx}}</text>志愿
				</view>
				<view class="fz30">是否专业服从调剂</view>
				<view class="flex alicen">
					<view class="flex alicen mr10" >
						<image class="w30 h30"
							:src="deilObj.sffczytj == 0?cosImageUrl('/check.png',true):cosImageUrl('/nocheck.png',true)"
							mode="aspectFill"></image>
						<view class="fz28 ml8">服从</view>
					</view>
					<view class="flex alicen">
						<image class="w30 h30"
							:src="deilObj.sffczytj == 1?cosImageUrl('/check.png',true):cosImageUrl('/nocheck.png',true)"
							mode="aspectFill"></image>
						<view class="fz28 ml8">不服从</view>
					</view>
				</view>
			</view>

			<view class="bgfff border1 boree">
				<view class="flex alicen  fz28">
					<view class="pt20 pb20 flex1 boree flexCenter bdr1_bottom">省市:{{deilObj.provinceName}}</view>
					<view class="pt20 pb20 flex1 boree flexCenter bdr1_bottom bdl1-left1">院校:{{deilObj.sname}}</view>
				</view>
				<view class="flex alicen  fz28">
					<view class="pt20 pb20 flex1 boree flexCenter bdr1_bottom">院校代码:{{deilObj.scode}}</view>
					<view class="pt20 pb20 flex1 boree flexCenter bdr1_bottom bdl1-left1">全国排名:{{deilObj.sranking}}</view>
				</view>
				<view class="flex alicen  fz28">
					<view class="pt20 pb20 flex1 boree flexCenter bdr1_bottom">专业组:{{deilObj.zyz}}</view>
					<view class="pt20 pb20 flex1 boree flexCenter bdr1_bottom bdl1-left1">投档概率:{{deil.zyzSubmitRate}}
					</view>
				</view>
				<view class="flex alicen  fz28">
					<view class="pt20 pb20 flex1 boree flexCenter bdr1_bottom bdl1-rigth1">招生计划人数:{{deil.totalPlan}}
					</view>
					<view class=" flex1 boree flexCenter"></view>
				</view>
			</view>
		</view>
		<view class="pt20 mt20 pb20 pl20 pr20 bgfff col33 ius10" v-for="(item,index) in deillist" :key="index">
			<view class="fz28 bold col00">{{item.majorName}}</view>
			<view class="flex alicen around mt20 fz28">
				<view class="">
					<view class="">全国排名:</view>
					<view class="mt10 txtcen">{{item.majorPm||'--'}}</view>
				</view>
				<view class="">
					<view class="">招生计划数:</view>
					<view class="txtcen mt10">{{item.majorPlan}}</view>
				</view>
				<view class="">
					<view class="">录取概率:</view>
					<view class="txtcen mt10">{{item.zySubmitRate||'--'}}%</view>
				</view>
			</view>
		</view>
		<view class="pb30"></view>
		<view class="pt20 pb20 bgff000 ius100 fz30 colff flexCenter mb20" @click="download(deil)">删除</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				sffIdx: 0,
				deillist: [],
				deilObj: {},
				deil:{},
				id:'',
			}
		},
		onLoad(options) {
			if (options.item&&options.index) {
				let item1 = JSON.parse(options.item)
				this.id = item1.id
				this.sffIdx = options.index
				this.details(item1);
			}
			
		},
		methods: {
			//下载
			async  download(item){
				let params = {
					zyId:item.zyId,
					pcId:item.pcId
				}
				let Item = await this.request.get('/api/delOneKeyAddZytb',{params})
				if(Item.code == 200){
					this.successToShow(Item.msg||'删除成功',call=>{
						this.goback(1);
					})
				}
			},
			async details(item) {
				let params = {
					zyId:item.id,
					zyz:item.zyzCode,
					scode:item.schoolCode,
					pcId:item.pcId,
					userId: this.readData('useId')
				}
				let deil = await this.request.get('/api/zyListBySchoolCodeZyzSubmit', {
					params
				})
				if (deil.code == 200) {
					this.deilObj = deil.data.school
					this.deillist = deil.data.zyList
					this.deil = deil.data
					console.log('deil', deil)
					this.saveData('pcid',deil.data.pcId)
					
				}
			}
		}

	}
</script>

<style>
</style>